<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>用户登录</title>
    <link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<h1>学生成绩管理系统</h1>
<table>
    <form action="./user_server.php" method="post">

        <tr>
            <td>用户名：</td>
            <td><input type="text" name="account"/></td>
        </tr>
        <tr>
            <td>密码：</td>
            <td><input type="password" name="password" /></td>
        </tr>
        <tr>
            <td><button type="submit">登录</button></td>
        </tr>

    </form>
    <tr>
        <td><button onclick="registered(this)">注册</button></td>
    </tr>
</table>
</body>
</html>
<?php
session_start();
$_SESSION['user.account']='';
?>

<script type="text/javascript">
    function registered(ele){
        let id=ele.parentElement.parentElement.children[0].innerText;
        window.location.href="registered.php";
    }
</script>


